package com.zszq.ms.bigmodeltest.enums;

/**
 * 大模型类别
 *
 * @author 孟帅
 * @since 2022/9/8
 */
public enum BigModelEnum {
    /**
     *  QWEN_TURBO
     */
    QWEN_TURBO("qwen-turbo", "qwen-turbo"),

    /**
     * 未删除
     */
    DEEPSEEK("deepseek-chat", "deepseek-chat");

    /**
     * 编码
     */
    private String code;

    /**
     * 描述
     */
    private String value;

    /**
     * 构造方法
     *
     * @param code  编码
     * @param value 描述
     */
    BigModelEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static BigModelEnum getByCode(String code) {
        for (BigModelEnum bigModelEnum : BigModelEnum.values()) {
            if (bigModelEnum.getCode().equals(code)) {
                return bigModelEnum;
            }
        }
        return null;
    }
}
